function PageUserLogin(options) {
  this._account = document.getElementById('input1');
  this._password = document.getElementById('input2');
  this._loginBtn = document.getElementById('button1');
  this._options = options;

  this._createElements();
}

PageUserLogin.prototype._createElements = function() {
  var _self = this;
  
  var func = function() { new RequestUtils()._custom('login', 'a=' + encodeURIComponent(_self._account.value) + '&p=' + encodeURIComponent(_self._password.value), function(result, params) { if (result.type) {
                                                                                                                                                                                                if (result.type == Constant.USER_TYPE_STAFF) {
                                                                                                                                                                                                  location.href = '?p=pagestaff&t=pagetransferin&m=' + JSON.stringify({ a: 1, b: 1, c: 1});
                                                                                                                                                                                                } else if (result.type == Constant.USER_TYPE_ADMINISTER) {
                                                                                                                                                                                                  location.href = '?p=pageadmin&t=pageinverstment&m=' + JSON.stringify({ a: 1, b: 1, c: 1 });
                                                                                                                                                                                                } else {
                                                                                                                                                                                                  window.alert('User Restricted');
                                                                                                                                                                                                }
                                                                                                                                                                                              } else {
                                                                                                                                                                                                window.alert('Incorrect Account and/or Password');
                                                                                                                                                                                              }
                                                                                                                                                                                            }, { pos: DOMUtils.findPos(_self._loginBtn) });
                         }
  this._account.onkeypress = function(e) { var code = DOMUtils.getEventCode(e);
                                           if (code == 13) {
                                             func();
                                           }
                                         };
  this._password.onkeypress = function(e) { var code = DOMUtils.getEventCode(e);
                                            if (code == 13) {
                                              func();
                                            }
                                          };
  
  this._loginBtn.onclick = function() { func();
                                      };
};